<template>
  <div>
    <div class="post-container " @click="topicTodetail(tabId,topicItem)">                
      <div class="post-thumb"><img v-lazy="topicimg" /></div>
      <div class="post-content">
          <p class="post-title">{{title}}</p>
          <div class="post-abbreviations">
            <div class="yl-2gz index_more_icon"></div>
            <div >{{followNumber}}人关注</div>
          </div>
      </div>
    </div>
    <div class="body-sep"></div>
  </div>
</template>
<script>
export default {
  props: [
    "topictype",
    "followNumber",
    "title",
    "abbreviations",
    "topicimg",
    "tabId",
    "topicItem"
  ],
  methods: {
    topicTodetail(tabId, topicItem) {
      this.$emit("topicback", { tabId: tabId, topicItem: topicItem });
    }
  }
};
</script>
<style scoped>
.post-container {
  padding: 0.25rem;
  overflow: auto;
  background: #fff;
  margin: 0 0.3rem;
  border: 1px solid #ffffff;
  border-radius: 0.2rem;
}
.post-container p{
  margin: 0;
}
.post-thumb {
  float: left;
}
.post-thumb img {
  display: block;
  width: 3rem;
  height: 1.5rem;
  border-radius: 0.1rem;
}
.post-content {
  margin-left: 3.25rem;
  position: relative;
}
.post-abbreviations {
  font-size: 0.22rem;
  color: #6e6e6e;
  clear: inherit;
  position: absolute;
  top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.6rem;
}
.post-title {
  clear: inherit;
  font-weight: bold;
  font-size: 0.28rem;
  color: #333333;
  position: absolute;
  top: 0.15rem;
  overflow:hidden; 
  text-overflow:ellipsis;
  display:-webkit-box; 
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2; 
}
.body-sep {
  height: 0.2rem;
  background-color: #f5f5f5;
}
.index_more_icon{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-top: 0.02rem;
}
</style>
